<%@page import="com.Tramite.Model.Usuario"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
aaaaaa
<%
  
   
   String nombre=(String)request.getParameter("username");
   String contra =(String)request.getParameter("password");
   Usuario usu=new Usuario(nombre,contra);
   if (usu.comprobar()==2 )
       request.getRequestDispatcher( "principalAdministrador.jsp" ).forward( request,response );
   //request.setAttribute("username",usu.getId());
     else{
            if(usu.comprobar()==1)
            {  
                request.setAttribute("nombreU",usu.getNombre());
                request.setAttribute("apellidoU",usu.getApellido());
                request.getRequestDispatcher( "principalUsuario.jsp" ).forward( request,response );
                
            }
            else
                {  
                    request.getRequestDispatcher( "error.jsp" ).forward( request,response );
            }
            
     
   
      }
   
      //request.setAttribute("username",usu.getPassword());



%>


